package com.party.business.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.party.business.domain.TUserNotice;
import com.party.business.mapper.TUserNoticeMapper;
import com.party.business.service.ITUserNoticeService;
import com.party.common.utils.DateUtils;
import com.party.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 消息通知Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-20
 */
@Service
public class TUserNoticeServiceImpl extends ServiceImpl<TUserNoticeMapper, TUserNotice>  implements ITUserNoticeService
{
    @Autowired
    private TUserNoticeMapper tUserNoticeMapper;

    /**
     * 查询消息通知
     *
     * @param id 消息通知主键
     * @return 消息通知
     */
    @Override
    public TUserNotice selectTUserNoticeById(String id)
    {
        return tUserNoticeMapper.selectTUserNoticeById(id);
    }

    /**
     * 查询消息通知列表
     *
     * @param tUserNotice 消息通知
     * @return 消息通知
     */
    @Override
    public List<TUserNotice> selectTUserNoticeList(TUserNotice tUserNotice)
    {
        return tUserNoticeMapper.selectTUserNoticeList(tUserNotice);
    }

    /**
     * 新增消息通知
     *
     * @param tUserNotice 消息通知
     * @return 结果
     */
    @Override
    public int insertTUserNotice(TUserNotice tUserNotice)
    {
                tUserNotice.setCreateTime(DateUtils.getNowDate());
            return tUserNoticeMapper.insertTUserNotice(tUserNotice);
    }

    /**
     * 修改消息通知
     *
     * @param tUserNotice 消息通知
     * @return 结果
     */
    @Override
    public int updateTUserNotice(TUserNotice tUserNotice)
    {
                tUserNotice.setUpdateTime(DateUtils.getNowDate());
        return tUserNoticeMapper.updateTUserNotice(tUserNotice);
    }

    /**
     * 批量删除消息通知
     *
     * @param ids 需要删除的消息通知主键
     * @return 结果
     */
    @Override
    public int deleteTUserNoticeByIds(String[] ids)
    {
        return tUserNoticeMapper.deleteTUserNoticeByIds(ids);
    }

    /**
     * 删除消息通知信息
     *
     * @param id 消息通知主键
     * @return 结果
     */
    @Override
    public int deleteTUserNoticeById(String id)
    {
        return tUserNoticeMapper.deleteTUserNoticeById(id);
    }



    @Autowired
    private ISysUserService sysUserService;


}
